<template>
  <div>
    <Search></Search>
    <div class="pay-container w">
      <div class="pay-info-wrap">
        <div class="pay-status-wrap">
          <p class="pay-status" v-if="payInfo.order_status">{{ $t(orderStatus[payInfo.order_status]) }}</p>
          <!-- <p class="pay-remain">剩余时间： 00 小时 00 分钟 00 秒</p> -->
        </div>
        <div class="pay-details">
          <p class="pay-info-p">
            <span class="pay-left-name">{{ $t("订单编号") }}:</span
            ><span>{{ payInfo.order_number }}</span>
          </p>
          <p class="pay-info-p">
            <span class="pay-left-name">{{ $t("订单金额") }}:</span
            ><span class="pay-info-price">{{$t('￥')}}{{ `${payInfo.zsprice}` }}</span>
          </p>
          <p>
            <span class="pay-left-name">{{ $t("收货地址") }}:</span
            ><span>{{ payInfo.addressInfo }}</span>
          </p>
        </div>
      </div>
    </div>
    <Cashier :orderNumber="payInfo.order_number"  :scene="payInfo.scene" />
  </div>
</template>

<script>
export default {
  name: "Pay",
  data() {
    return {
      payModal: false,
    };
  },
  created () {
    const {query={}} = this.$route || {}
    this.payInfo = query
    this.orderStatus = {
      'success':'订单提交成功'
    }
  },
  methods: {
    goPay() {
      this.payModal = true;
    },
  },
  components: {
    Search:()=>import("@/components/Search"),
    Cashier:()=>import("@/components/cashier"),
  },
};
</script>

<style lang="scss" scoped>
@import "@/common/style/common.scss";
.pay-container {
  margin: 15px auto;
}
.pay-box {
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pay-demo {
  width: 50%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.pay-demo img {
  height: 80%;
}
.pay-qr-scan {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.pay-tips {
  width: 50%;
  text-align: center;
  font-size: 14px;
  line-height: 30px;
}
.pay-tips a {
  color: #999999;
}
.pay-info {
  &-wrap {
    background-color: #fff;
  }
  &-price {
    font-size: 16px;
    font-weight: bold;
    color: #e2231a;
  }
}
.pay-status-wrap {
  background-color: #e2231a;
  color: #fff;
  padding: 30px 30px 20px;
}
.pay-details {
  padding: 30px;
  & > p {
    margin-bottom: 20px;
  }
}
.pay-left-name {
  width: 100px;
  display: inline-block;
  font-weight: bold;
  color: #333;
}
.pay-status {
  font-size: 30px;
  font-weight: bold;
}
.pay-remain {
  font-size: 14px;
}
</style>
